//
//  VisitorViewController.swift
//  54_Weibo(swift)
//
//  Created by 梦然 张 on 16/4/7.
//  Copyright © 2016年 梦然 张. All rights reserved.
//

import UIKit

class VisitorViewController: UITableViewController {
    
    var userLogin = false
    
    override func loadView() {
        userLogin ? super.loadView() : setupVisitorView()
    }
    
    var visitorView: VisitorLoginView?
    
    
    private func setupVisitorView(){
        visitorView = VisitorLoginView()
        view = visitorView
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: .Plain, target: nil, action: nil)
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", style: .Plain, target: nil, action: nil)
        
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        // Uncomment the following line to preserve selection between presentations
        // self.clearsSelectionOnViewWillAppear = false

        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 0
    }

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }

}
